import request from "@/utils/request";
// 1.获取菜单管理权限列表
export const getMenuListApi = () => {
    return request({
        url: "/admin/permission/menu",

    })
}

export const setIsShowApi = (id, state) => {
    return request({
        url: `/admin/permission/menu/${id}/${state}`
    })
}

// 删除权限
export const delMenuApi = (id) => {
    return request({
        url: '/admin/permission/menu/' + id,
        method: 'DELETE'
    })
}

// 添加权限菜单
export const addMenuApi = (data) => {
    return request({
        url: "/admin/permission/menu",
        method: 'POST',
        data
    })
}
// 编辑权限菜单
export const editMenuApi = (data) => {
    return request({
        url: "/admin/permission/menu/" + data.id,
        method: 'PUT',
        data
    })
}